var columns = [
    {
        field: 'index',
        title: '序号',
        align:"center",
        formatter: function (value, row, index) {
            return index + 1 + (row.pageNumber - 1) * row.pageSize;
        }
    },{
        field: 'title',
        title: '标题',
        align: 'center',
        sortable: true
    },{
        field: 'authorName',
        title: '作者',
        align: 'center',
        sortable: true
    },{
        field: 'createTime',
        title: '创作时间',
        align: 'center',
        sortable: true
    },{
        field: 'operator',
        title: '操作',
        align: 'center',
        formatter: function (value, row, index) {
            return pubOptBtn.getOptBtn('notice',menu,row.id);
        }
    }];

var notice={
    noticeInit:function () {
        pubOptBtn.getHeadBtn("p","#toolbar","notice",menu);
        pubForm.getBootTable("#notice_table","/index/queryCampusBulletin");
    },
    showAddCampusBulletin:function () {
        loadUtil = new Load($);
        loadUtil.load({
            container:'#homeContent',
            url: application.contextPath+"/index/showAddCampusBulletin?type=5&parentId="+menuId
        });
    },
    showCampusBulletin:function (id) {
        loadUtil = new Load($);
        loadUtil.load({
            container:'#homeContent',
            url: application.contextPath+"/index/showCampusBulletin?ntId="+id
        });
    },
    toUpdateCampusBulletin:function (id) {
        loadUtil = new Load($);
        loadUtil.load({
            container:'#homeContent',
            url: application.contextPath+"/index/toUpdateCampusBulletin?ntId="+id+"&type=5&parentId="+menuId
        });
    },
    delCampusBulletin:function (id) {
        pubForm.delRow(id,"/index/delCampusBulletin","/index/queryCampusBulletin","#notice_table");
    }
};


$(document).ready(function(){
    notice.noticeInit();
});